| Year |
|---|
| 1967 |
Below we will investigate the relationship between continent and energy use (kg of oil per capita) spanning the entirety of the dataset. Given that continent is a nonbinary, categorical variable and energy use is a quantitative variable, we will start with an ANOVA test for statistical significance.
## Df Sum Sq Mean Sq F value Pr(>F)
## continent 4 7.715e+08 192870621 51.46 <2e-16 ***
## Residuals 843 3.160e+09 3748033
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 436 observations deleted due to missingness
Given that the p-value is below 0.05, at a standard confidence level of
95%, we have determined that there is some statistically significant
relationship between continent and energy use in this dataset. For more
specific understanding of that relationship, we will now use Tukey HSD
testing for pairwise comparisons of energy use between each two
countries.
| diff | lwr | upr | p adj | |
|---|---|---|---|---|
| Americas-Africa | 1005.1037 | 466.8326 | 1543.3748 | 0.0000041 |
| Asia-Africa | 1168.7636 | 628.2529 | 1709.2742 | 0.0000000 |
| Europe-Africa | 2447.5453 | 1947.3838 | 2947.7067 | 0.0000000 |
| Oceania-Africa | 3281.7976 | 2040.3410 | 4523.2543 | 0.0000000 |
| Asia-Americas | 163.6599 | -384.4160 | 711.7357 | 0.9256447 |
| Europe-Americas | 1442.4416 | 934.1141 | 1950.7691 | 0.0000000 |
| Oceania-Americas | 2276.6940 | 1031.9249 | 3521.4630 | 0.0000069 |
| Europe-Asia | 1278.7817 | 768.0833 | 1789.4801 | 0.0000000 |
| Oceania-Asia | 2113.0341 | 867.2950 | 3358.7732 | 0.0000402 |
| Oceania-Europe | 834.2524 | -394.5176 | 2063.0223 | 0.3421942 |
As seen above, there are two pairs with a p-value > 0.05:
Asia-Americas and Europe-Oceania. This observation supports a three-way
clustering of energy use by continent in which one cluster consists
solely of Africa, the other consists of Asia and America, and the other
consists of Europe and Oceania. Within-cluster similarity is illustrated
by the below boxplot.
Below we will determine whether there is a significant difference between Europe and Asia with respect to import goods and services as a % of GDP. Given that we are using a binary subset of the categorical continent variable for prediction and that import goods and services as a % of GDP is a quantitative variable, t-testing will be used.
| pval |
|---|
| 0.1575197 |
Given that the p-value is above 0.05, there is not a significant difference between Europe and Asia with respect to import goods and services as a % of GDP.
The above boxplot provides a visual intuition for the lack of a significant difference between Europe and Asia with respect to import goods and services as a % of GDP. The medians for the two countries are roughly the same, and the lower and upper quartiles for both countries are both in roughly the range [25, 60], which covers less than a quarter of the full range of the data.
| Country Name |
|---|
| Macao SAR, China |
| Country Name |
|---|
| Maldives |